package org.easyelf.springmvc.test;

import com.google.common.hash.HashCode;
import com.google.common.hash.Hashing;
import com.google.common.io.Files;

import java.io.File;
import java.io.IOException;
import java.util.Date;

/**
 * @Title: MD5
 * @Description:
 * @Package: org.easyelf.springmvc.test with IntelliJ IDEA
 * @User: RehngaO
 * @Date: 2017-03-29
 * @Time: 上午11:09
 */
public class MD5 {
    public static void main(String args[]){
        System.out.println(new Date());
        File file = new File("/Users/RehngaO/Documents/结婚相关/1502093-高宇-李林萌（婚纱照）.rar");
        HashCode hashmd5 = null;
        try {
            hashmd5 = Files.hash(file, Hashing.md5());
        } catch (IOException e) {
            e.printStackTrace();
        }
        System.out.println(hashmd5);
        System.out.println(new Date());
    }
}
